<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script type="text/javascript">

function insertData(form){
	if($("#columnsKoArea").val().split("\n").length != $("#columnsEnArea").val().split("\n").length ){
		alert("두개의 필드가 line수가 일치하지 않습니다.");
		return;
	} 
	
	//submitPost(form, insertDataGenCallback);
}

function insertDataGenCallback(data){
	document.getElementById("resultArea").value=data.output;
	//$('#rightTextArea').text(data.output);
}
</script>
<style type="text/css">
.my-box { border:1px  dashed; padding:10px; }
</style>
<h1>${title}</h1>
<form name="myForm" action="./insertData" method="post">
<br>
<div id="option">

<br><br>
<b></b><br>
<div id="columnsEnDiv" class="voGen">
	한글명<br>
	<textarea id="columnsEnArea" name="col_en_input" cols="20" rows="20"></textarea>
</div>
<div id="columnsKoDiv" class="voGen">
영문명 <br>
	<textarea id="columnsKoArea" name="col_ko_input" cols="20" rows="20"></textarea>
</div>
<div id="buttons"  class="voGen">
	<input type="button" name="forward" onClick="insertData(document.myForm)" value="Data insert" />
</div>

<div id="result" class="voGen">
성공여부 <br>
	<textarea id="resultArea" name="resultArea" cols="20" rows="2"></textarea>
</div>
</form>